package com.njwb.day17.yinhang;

// 用户操作线程
class User extends Thread {
    private Account account;
    private String userName;

    public User(Account account, String userName) {
        this.account = account;
        this.userName = userName;
    }

    @Override
    public void run() {
        account.deposit(100, userName);   // 存款
        account.withdraw(50, userName);   // 取款
    }
}